package org.goldenport.g3.sample

import org.goldenport.g3._
import org.goldenport.g3.messages._
import org.goldenport.g3.atom._
import org.goldenport.g3.channels.twitter._
import org.goldenport.g3.channels.evernote._
import org.goldenport.g3.channels.dropbox._
import org.goldenport.g3.channels.googleApps._

/**
 * @since   Jul. 23, 2010
 * @version Jul. 23, 2010
 * @author  ASAMI, Tomoharu
 **/
class MultiPost extends G3Application with TwitterContext with EvernoteContext with DropboxContext with GoogleAppsContext {
  twitter('inTwitter)
  evernote('outEvernote)
  dropbox('outDropbox)
  gdocs('outGdocs)

  start invoke("inTwitter") agent {
    case AtomFeed(feed) => {
      Post("count.txt", feed.entries.length.toString)
    }
  } publish("outEvernote", "outDropbox", "outGdocs")
}
